package com.xjd.transport;

import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.util.concurrent.ExecutorService;

public interface TransportClient {
	
	//==workerExecutorService
	void setWorkerExecutorService(ExecutorService workerExecutorService);
	ExecutorService getWorkerExecutorService();
	
	//==
	void setMaxOpenedChannel(int maxOpened);
	int getMaxOpenedChannel(); 
	
	//==open channel
	Channel openChannel(String host, int port) throws TransportException;
	Channel openChannel(InetSocketAddress destAddress) throws TransportException;
	
	//==monitor
	Channel[] getOpenedChannels();
	Channel[] getOpenedChannelsTo(InetAddress dest);
	
	//==stop
	void stop();
	
	
}